package com.cstor.liang.service;

import com.cstor.liang.mapper.RoleMapper;
import com.cstor.liang.pojo.entity.Role;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created by Administrator on 2017/9/3.
 */
@Service
@Transactional
public class RoleService extends BaseService<Role>{

    @Autowired
    private RoleMapper roleMapper;

    /**
     * 列出所有的角色
     * @return
     */
    @Transactional(readOnly = true)
    public List<Role> getAllRole(){
        return roleMapper.selectAll();
    }

}
